package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.SysPeople;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PeopleMapper extends BaseMapper<SysPeople> {

    @Select("select * from t_people where dept_name=#{deptName}")
    List<SysPeople> selectByDeptName(String deptName);

    @Select("select * from t_people where dept_id=#{deptId} and is_effect = 1 and is_active = 1")
    List<SysPeople> selectByDeptId(String deptId);

//    @Select("select * from people where dept_id=#{id}")
//    List<People> selectByDeptId(Long id);

    @Select("select * from t_people where out_id=#{id}")
    SysPeople selectByOutId(String id);
}
